// 配置路由的地方
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import { HDataTable } from "@/components";
import { QualityScheme, Home, DataSources,QualityTetection, PersonalChange,JobManagement } from "@/views";
// 配置路由
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    name: "主页面",
    component: () => Promise.resolve(Home),
  },
  {
    path: "/h-data-table",
    name: "规则管理",
    component: () => Promise.resolve(HDataTable),
  },
  {
    path: "/job-management",
    name: "工作管理",
    component: () => Promise.resolve(JobManagement),
  },
  {
    path: "/quality-scheme",
    name: "质量方案",
    component: () => Promise.resolve(QualityScheme),
  },
  {
    path: "/data-sources",
    name: "数据源管理",
    component: () => Promise.resolve(DataSources),
  },
  {
    path:'/quality-tetection',
    name:'质量检查',
    component:()=>Promise.resolve(QualityTetection)
  },
  {
    path: "/personal-change",
    name: "人员变更",
    component: () => Promise.resolve(PersonalChange),
  },
];
// 返回一个router实例，为函数配置history模式
const router = createRouter({
  history: createWebHistory(),
  routes,
});
// 导出路由，去main.ts中挂载
export default router;
